#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import socket

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client.connect_ex(("127.0.0.1", 1999))

while True:
    inp = input("请输入要发送的信息: ").encode("utf-8")
    if not inp: continue
    client.send(inp)
    service_recv = client.recv(1024)
    print(service_recv)

client.close()
